#include<stdio.h>
static int stringLen(char *string);
int main(void)
{
    char string1[] = "Hello world"; //字符数组存储字符串指针.char []--数组形式
    char *string2 = "Hello world";  //字符指针指向字符串常量.char * --指针变量
    char *string3 = string1;        //指向字符数组的指针
    printf("The length of string1 is %d\n", stringLen(string1));
    printf("The length of string2 is %d\n", stringLen(string2));
    printf("The length of string3 is %d\n", stringLen(string3));
    return 0;
}
static int stringLen(char *string)
{
    char *str_pt;
    int str_len;
    str_pt = string;
    while(*str_pt != '\0')
    {
        str_pt ++;
        str_len ++;
    }
    return str_len;
}
